package com.starlink.model.util;

import com.starlink.model.dtomapper.UserVipSetDtoMapper;
import com.starlink.model.domain.UserVipSetDO;
import com.starlink.model.vo.UserVipSetVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class UserVipSetConvert {

    public static List<UserVipSetVO> buildUserVipSetVoList(List<UserVipSetDO> userVipSetDOList) {
        if (CollectionUtils.isEmpty(userVipSetDOList)) {
            return Lists.newArrayList();
        }
        List<UserVipSetVO> userVipSetVOList = new ArrayList<>();
        for (UserVipSetDO userVipSetDO : userVipSetDOList) {
            userVipSetVOList.add(UserVipSetDtoMapper.INSTANCE.do2VO(userVipSetDO));
        }

        return userVipSetVOList;
    }
}
